//
//  Credits.m
//  TestUsingCocos2dAndCocosBuilder
//
//  Created by Ronald Ram on 1/3/13.
//  Copyright 2013 Ronald Ram. All rights reserved.
//

#import "Credits.h"
#import "MenuMgr.h"
#import "SceneMgr.h"

#import "MainMenu.h"

#import "CCBReader.h"
#import "CCControlButton.h"


@interface Credits()
- (void) debugData;
- (void) startUpData;
- (void) didLoadFromCCB;

@end


@implementation Credits

- (void) onPress: (id) sender
{
    CCControlButton *button = (CCControlButton *) sender;
    CCLayer *layer = nil;
    
    switch (button.tag)
    {
            case MAIN_MENU:
            layer = (CCLayer *) [CCBReader nodeGraphFromFile: @"MainMenu.ccbi"];
            [[SceneMgr sharedScene] switchLayer: layer];
            break;
    }
}

#pragma mark Private-Methods
- (void) startUpData
{
    self.tag = CREDITS;
}

- (void)didLoadFromCCB
{
    [self startUpData];
}

- (void) debugData
{
    //debug code for testing goes here...
}

@end
